<template>
	<view class="feedback">
		<view class="title title_hd">
			<view class="info-item ys-6">
				反馈时间
			</view>
			<view class="info-item ys-3 ys-mid">
				当前状态
			</view>
			<view class="info-item ys-3 ys-right">
				记录操作
			</view>
		</view>
		<view class="title" v-for="(item,index) in data" :key="index">
			<view class="info-item ys-6">
				{{item.time}}
			</view>
			<view class="info-item ys-3 ys-mid">
				{{item.dec}}
			</view>
			<view class="info-item detail ys-3 ys-right">
				<text @click="todetail(item.id)">查看详情 </text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		Feedback
	} from '../../api/user.js'
	export default {
		data() {
			return {
				data: []
			}
		},
		onLoad() {
			this.Feedback()
		},
		onShow() {
			this.Feedback()
		},
		methods: {
			Feedback() {
				Feedback().then(res => {
					console.log(res)
					this.data = res.data
				})
			},
			todetail(id) {
				uni.navigateTo({
					url: '/pages/FeedbackDetail/index?id=' + id
				})
			}
		}
	}
</script>

<style lang="scss">
	.feedback {
		padding-top: 10px;

		.title_hd {
			font-weight: bold;
		}

		.title {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 2% 5%;
			font-size: 14px;
		}

		.detail {
			text {
				background: $uni-bg-color;
				color: #fff;
				padding: 3px;
				font-size: 13px;
			}

		}
	}
</style>
